<template>
  <div>
    <el-input v-model="value" v-bind="elProps" @input="input" @focus="GetFocus"></el-input>
  </div>
</template>

<script setup>
import { ref, watch } from "vue";
const props = defineProps({
  elProps: Object,
  modelValue: [String,Number], 
});

const value = ref() 
watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
value.value = props.modelValue
const emits = defineEmits(['update:modelValue'])
const input = (e)=>{
  emits('update:modelValue', value.value)
}

const GetFocus = ()=>{
  // if (value.value.indexOf('*')<0) {
  //   value.value = ''
  // }
}
</script>

<style lang="scss" scoped>
</style>